﻿using System.ComponentModel.DataAnnotations;
using MaxStoreErp.Core.BaseClasses;

namespace MaxStoreShop.Domain.Directories
{
    /// <summary>
    /// Поставщик товаров
    /// </summary>
    public class Supplier : EntityBase
    {
        string _name;
        string _note;
        string _phone;

        /// <summary>
        /// Наименование поставщика
        /// </summary>
        [Required]
        [StringLength(200)]
        public string Name
        {
            get { return _name; }
            set { OnPropertyChanged(ref _name, value, "Name"); }
        }

        /// <summary>
        /// Примечание
        /// </summary>
        public string Note
        {
            get { return _note; }
            set { OnPropertyChanged(ref _note, value, "Note"); }
        }

        /// <summary>
        /// Контактные телефоны поставщика
        /// </summary>
        [Required]
        [StringLength(150)]
        public string Phone
        {
            get { return _phone; }
            set { OnPropertyChanged(ref _phone, value, "Phone"); }
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
